package com.haoting.blogcms.service.impl;

import com.haoting.blogcms.entity.Banner;
import com.haoting.blogcms.mapper.BannerMapper;
import com.haoting.blogcms.service.BannerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tingting
 * @since 2021-01-04
 */
@Service
public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner> implements BannerService {

    

    @Override
    @Cacheable(value = "banner",key="'selectIndexList'")
    public List<Banner> selectAllBanner() {
        List<Banner> list = baseMapper.selectList(null);
        return list;
    }
}
